home *** CD-ROM | disk | FTP | other *** search
/ Stone Design / Stone Design.iso / Stone_Friends / Wave / WavesWorld / Source / IBPalettes / WW3DKit / newExprCmds < prev    next >
Encoding:
Text File  |  1995-03-22  |  2.3 KB  |  52 lines

  1. The following are additional math functions which have been defined
  2. for use in the tcl command expr.  Many of them are modeled after
  3. RenderMan shading language functions.
  4.  
  5. pi
  6.     returns the exact value (to 32 bit IEEE precision) value of PI
  7.  
  8. radians angleInDegrees
  9.     returns angleInDegrees converted to units of radians.
  10.  
  11. degrees angleInRadians
  12.     returns angleInRadians converted to units of degrees.
  13.  
  14. sign arg
  15.     returns -1 if arg is negative, 0 if zero, and +1 is arg is positive
  16.  
  17. min arg1 arg2
  18.     returns the minimum of arg1 and arg2
  19.  
  20. max arg1 arg2
  21.     returns the maximum of arg1 and arg2
  22.  
  23. clamp val min max
  24.     returns val clamped between min and max
  25.  
  26. step min val
  27.     returns 0 if val is less than min, otherwise it returns 1
  28.  
  29. spline u pt1 pt2 pt3 pt4
  30.     returns to point along the spline specified by the 4 control pts at u (0<=u<=1)  on the curve.  Note that for a more flexible spline routine, use the new tcl command spline.
  31.  
  32. smoothstep min max value
  33.     if value is less than min, it returns min, if it's above max, it returns max, otherwise it smoothly interpolates between them
  34.  
  35. lerpDown u, min, max
  36.     if u is less than or equal 0, it returns max, if it's above or equal 1, it returns min, otherwise it smoothly interpolates between them, downwards
  37.  
  38. lerpUp u, min, max
  39.     if u is less than or equal 0, it returns min, if it's above or equal 1, it returns max, otherwise it smoothly interpolates between them, upwards
  40.  
  41. noise x y z
  42.     it returns some value between 0 and 1 which is a pseudorandom function of its argument using Perlin's noise function - see Ch 2 of "Texturing and Modeling: A Procedural Approach" by David Ebert et.al. for more info.
  43.  
  44. gvnoise x y z
  45.     it returns some value between 0 and 1 which is a pseudorandom function of its argument using a gradient value noise function - see Ch 2 of "Texturing and Modeling: A Procedural Approach" by David Ebert et.al. for more info.
  46.  
  47. scnoise x y z
  48.     it returns some value between 0 and 1 which is a pseudorandom function of its argument using a sparse convolution noise function - see Ch 2 of "Texturing and Modeling: A Procedural Approach" by David Ebert et.al. for more info.
  49.  
  50. vcnoise x y z
  51.     it returns some value between 0 and 1 which is a pseudorandom function of its argument using another noise function - see Ch 2 of "Texturing and Modeling: A Procedural Approach" by David Ebert et.al. for more info.
  52.